home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PD ROM 1
/
PD ROM Volume I - Macintosh Software from BMUG (1988).iso
/
Programming
/
Complete Applications
/
Othello C Source
/
getmove.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1985-06-16
|
416 b
|
24 lines
|
[
TEXT/ttxt
]
/* getmove.c - GetMove */
#include "mac/quickdraw.h"
#include "mac/osintf.h"
#include "mac/toolintf.h"
#include "othello.h"
GetMove(where, move)
Point *where;
MoveRecord *move;
{
int row, col;
row = where->v - SCALE/2;
col = where->h - SCALE/2;
if (row < 0 || col < 0)
return(FALSE);
move->row = row / SCALE + 1;
move->col = col / SCALE + 1;
return(move->row <= BOARDSIZE && move->col <= BOARDSIZE);
}